<template>
	<view>
		<radio-group @change="radioChange">
			<label class="uni-list-cell uni-list-cell-pd" v-for="item in data" :key="item.value">
				<view class="rad">
					<radio :value="item.value" :checked="value === item.value" />
				</view>
				<view class="txt">{{item.name}}</view>
			</label>
		</radio-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props:{
			value:{
				type:String,
				default() {
					return ''
				}
			},
			data:{
				type:Array,
				default() {
					return []
				}
			}
		},
		methods:{
			radioChange(e){
				 this.$emit('input', e.target.value);
			}
		}
	}
</script>

<style scoped lang="scss">
	.uni-list-cell view{
		display: inline-block;
		font-size: 28upx;
	}
	.rad{
		margin-right: 10upx;
	}
	.txt{
		margin-right: 20upx;
	}
	radio{
		transform:scale(0.7);
	}
</style>
